using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class EmployeesExtend
{
		public static ResponseEmployeesDto ToResponseDto(this Employees entity)
{			return new ResponseEmployeesDto
			{
				id = entity.EId,
				accountId = entity.EAccountId,
				carShopId = entity.ECarShopId,
				name = entity.EName,
				gender = entity.EGender,
				birthDate = entity.EBirthDate,
				birthDateStr =Tools.TimeToString(entity.EBirthDate),
				idCardNumber = entity.EIdCardNumber,
				phoneNumber = entity.EPhoneNumber,
				email = entity.EEmail,
				address = entity.EAddress,
				emergencyContact = entity.EEmergencyContact,
				position = entity.EPosition,
				hireDate = entity.EHireDate,
				hireDateStr =Tools.TimeToString(entity.EHireDate),
				status = entity.EStatus,
				remark = entity.ERemark,
			};
		}
	}
}
